namespace java pub.wii.cook.thrift

struct Category {
    1: string name,
    2: string title
}

struct Ticket {
    1: i32 id,
    2: i32 price,
    3: string name,
    4: double premote
    5: list<Category> categories;
}

struct TicketRequest {
    1: i32 id
}

struct TicketResponse {
    // code=0: 正常
    // code=10001: 票不存在
    1: i32 code,
    2: Ticket ticket
}

service TicketService {
    TicketResponse getTicket(1: TicketRequest request),
    list<Ticket> listTicket()
}